@echo off
chcp 65001 >nul
echo ================================
echo 🚀 FastAPI Dog Breed Trainer 启动脚本 (Windows)
echo ================================

:: Step 1: 创建虚拟环境
::if not exist venv (
::    echo 📦 创建 Python 虚拟环境...
::    python -m venv venv
::) else (
::    echo ✅ 虚拟环境已存在
::)
::
:::: Step 2: 激活虚拟环境
::echo 🔥 激活虚拟环境...
::call venv\Scripts\activate

:: Step 3: 安装依赖
::echo 📥 安装依赖中...
::python -m pip install --upgrade pip
::pip install fastapi uvicorn torch torchvision pillow numpy scikit-learn joblib tqdm
::
:: Step 4: 启动 FastAPI 服务
echo 🚀 启动 FastAPI 服务中...
uvicorn main:app --reload --host 0.0.0.0 --port 8000

pause
